{% extends 'frame.html' %}


{% block right-container %}
<div class="right-container">
    <div class="panel panel-default">
        <div class="panel-heading">
            系统状态
        </div>
        <div class="panel-body">
            <table class="table table-bordered sysstat">
                <tr>
                    <td>
                        SaltStack Master运行状态
                        <span class="master-running"></span>
                    </td>
                    <td>
                        CPU Idle
                        <span class="cpuidle"></span>
                    </td>
                    <td>
                        可用内存
                        <span class="freemem"></span>
                    </td>
                </tr>
            </table>

        </div>
    </div>
    <div class="panel panel-default panel-proinfo panel-left">
        <div class="panel-heading">
            最近添加项目
        </div>
        <div class="panel-body">
                <table class="table">
                    <tr>
                        <th>Id</th>
                        <th>项目名</th>
                        <th>更新时间</th>
                    </tr>
                    {% for m in ProjectList %}
                        <tr>
                            <td>{{ m.id }}</td>
                            <td>{{ m.ProJectName }}</td>
                            <td>
                                <script>
                                    document.write(new Date({{ m.UpdateTime }} * 1000).toLocaleString())
                                </script>
                            </td>
                        </tr>
                    {% endfor %}
                </table>
        </div>
    </div>
    <div class="panel panel-default panel-proinfo panel-right">
        <div class="panel-heading">
            最近执行操作
        </div>
        <div class="panel-body">
            <table class="table">
                    <tr>
                        <th>Id</th>
                        <th>项目名</th>
                        <th>更新时间</th>
                    </tr>
                    {% for m in Options %}
                        <tr>
                            <td>{{ m.id }}</td>
                            <td>{{ m.Content }}</td>
                            <td>
                                <script>
                                    document.write(new Date({{ m.UpdateTime }} * 1000).toLocaleString())
                                </script>
                            </td>
                        </tr>
                    {% endfor %}
                </table>
        </div>
    </div>
</div>

{% endblock %}